package cn.edu.nju.askinginhand.activity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TabHost;

public class HomeActivity extends TabActivity{
	  @Override
	    protected void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);

	        TabHost tabHost = getTabHost();
	        LayoutInflater.from(this).inflate(R.layout.home_tab, tabHost.getTabContentView(), true);

/*	        // Tab 1 的内容
	        tabHost.addTab(tabHost.newTabSpec("tab1")
	                .setIndicator("积分排名",getResources().getDrawable(R.drawable.icon))
	                .setContent(new Intent(this,PersonalInfoActivity.class)));
*/	        
	        tabHost.addTab(tabHost.newTabSpec("tab2")
	                .setIndicator("个人信息")
	                .setContent(new Intent(this,PersonalInfoActivity.class)));
	        tabHost.addTab(tabHost.newTabSpec("tab3")
	                .setIndicator("操作历史")
	                .setContent(new Intent(this,QuesHistoryActivity.class)));
	        tabHost.addTab(tabHost.newTabSpec("tab4")
	                .setIndicator("收件箱")
	                .setContent(new Intent(this,PersonalInfoActivity.class)));
	        tabHost.addTab(tabHost.newTabSpec("tab5")
	                .setIndicator("修改密码")
	                .setContent(new Intent(this,PersonalPasswordActivity.class)));
/*
 * 	        
	        // Tab 2 的内容（设置了 Tab 图片）
	        tabHost.addTab(tabHost.newTabSpec("tab2")
	                .setIndicator("tab2", getResources().getDrawable(R.drawable.top_info))
	                .setContent(R.id.view2));
	        
	        // Tab 3 的内容（设置 Tab 的内容为指定的 Activity）
	        tabHost.addTab(tabHost.newTabSpec("tab3")
	                .setIndicator("tab3")
	                .setContent(new Intent(this, HelloActivity.class)));
*/
	    }
}
